<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org/">
<head>
    <meta charset="UTF-8">
    <title>goodsList</title>

    <base href="http://localhost/shop-resources/back/">

    <LINK rel="Bookmark" href="/favicon.ico" >
    <LINK rel="Shortcut Icon" href="/favicon.ico" />
    <script type="text/javascript" src="lib/html5.js"></script>
    <script type="text/javascript" src="lib/respond.min.js"></script>
    <link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
    <link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <link href="lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="pd-20">
    <div class="cl pd-5 bg-1 bk-gray mt-20">
        <span class="l">

        <a href="javascript:;" onclick="datadel()" class="btn btn-danger radius">
            <i class="Hui-iconfont">&#xe6e2;</i> 批量删除
        </a>

        <a href="javascript:;" onclick="goods_add('添加商品','http://localhost/shop-back/goodsController/addGoods.html','800','500')" class="btn btn-primary radius">
            <i class="Hui-iconfont">&#xe600;</i> 添加商品</a>
    </span>
    </div>
    <table class="table table-border table-bordered table-bg">
        <thead>
        <tr>
            <th scope="col" colspan="9">商品列表</th>
        </tr>
        <tr class="text-c">
            <th width="25"><input type="checkbox" name="" value=""></th>
            <th width="40">ID</th>
            <th width="150">商品名称</th>
            <th width="150">商品描述</th>
            <th width="150">商品价格</th>
            <th width="150">商品图片地址</th>
            <th width="100">操作</th>
        </tr>
        </thead>
        <tbody>
        <tr class="text-c" th:each="goods:${goodsList}">
            <td><input type="checkbox" value="1" name=""></td>
            <td th:text="${goods.id}"></td>
            <td th:text="${goods.gname}"></td>
            <td th:text="${goods.gdesc}"></td>
            <td th:text="${goods.gprice}"></td>
<!--            <td th:text="${goods.gpng}"></td>-->
            <td>
                <img width="100" height="100" th:src="${png}" th:each="png:${#strings.listSplit(goods.gpng,'|')}">
            </td>
            <td class="td-manage"><a style="text-decoration:none" onClick="admin_stop(this,'10001')" href="javascript:;" title="停用"><i class="Hui-iconfont">&#xe631;</i></a>
                <a title="编辑" href="javascript:;" th:onclick="|goods_edit('物品编辑','http://localhost/shop-back/goodsController/UpdateGoods',${goods.id},'1000','500')|" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a>
                <a title="删除" href="javascript:;" onclick="admin_del(this,'1')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a></td>
        </tr>

        </tbody>
    </table>
</div>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="lib/layer/1.9.3/layer.js"></script>
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="js/H-ui.js"></script>
<script type="text/javascript" src="js/H-ui.admin.js"></script>
<script type="text/javascript">
    function goods_add(title,url,w,h){
        layer_show(title,url,w,h);
    }
    function goods_edit(title,url,id,w,h){
        layer_show(title,url+"/"+id,w,h);
    }
</script>
</body>
</html>